package com.mall.coupon.server.mapper;

import com.mall.coupon.common.domain.CmsCoupon;
import com.mall.coupon.common.domain.domain.Coupon;
import com.mall.coupon.common.domain.domain.SkuCouponMiddle;
import com.mall.coupon.common.domain.domain.UserCouponMiddle;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName CouponMapper
 * @Description 描述
 * @Author Qiu Feng
 * @Date 2025/1/13 14:42
 */
@Mapper
public interface CouponMapper {


    void userCouponAdd(UserCouponMiddle userCouponMiddle);

    Coupon selectCouponById(Integer id);

    List<UserCouponMiddle> userCouponMiddleList(@Param("userId") Long userId, @Param("couponStatus") Integer couponStatus);

//    UserCouponMiddle selectUserIdAndCouponId(@Param("userId") Long userId, @Param("couponId") Long couponId);

    void updateUserCouponMiddleStatus(Integer id);

    List<Coupon> settlementCouponList(Long userId);

    SkuCouponMiddle selectSkuCouponMiddleList(@Param("skuId") List<Long> skuId, @Param("id") Integer id);

    UserCouponMiddle selectUserCouponByUserIdAndCouponId(@Param("userId") Long userId, @Param("id") Integer id);
}
